home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS24.ADF / BoingMachine / NEW_README! < prev    next >
Text File  |  1988-04-16  |  11KB  |  326 lines

  1.                       MOVIE! a ram animation system
  2.  
  3.                                    by
  4.  
  5.                                Eric Graham
  6.  
  7.                               Version 1.01
  8.  
  9.         (THESE DOCS ARE SLIGHTLY DIFFERENT THAN THE PREVIOUS VERSIONS)
  10.         (Please read the part about MODE COLOR LOCK and EXPOSURE LOCK)
  11.  
  12. The MOVIE! ram animation system consists of three programs that must be
  13. run from CLI.  You will need to be familiar with CLI and with the use of
  14. a text editor, such as ED, because you will need to write text files to
  15. control the animation.  The three programs are:
  16.  
  17.         DILBM   Calculates the difference between two image files.
  18.         PILBM   Packs several difference files into a single animation
  19.                 file.
  20.         MOVIE   Plays back the animation.
  21.  
  22. Before you run these programs, make sure that you have sufficient stack
  23. space.  Issue the CLI command
  24.  
  25.         STACK 16000
  26.  
  27. unless a similar command is in your startup-sequence.  Failure to provide
  28. enough stack space will usually result in the system requester and a visit
  29. from the Guru.
  30.  
  31. This system differs from other similar programs in several important
  32. ways:
  33.  
  34.     1) It is in the public domain.  It may be freely copied and
  35. distributed for non commercial purposes.  Upgrades and enhancements may
  36. be provided from time to time.
  37.  
  38.     2) It employs J-type animation compression.  This is an adaptive
  39. algorithm that employs numerous different strategies to achieve the best
  40. compression and fastest playback.  Additional strategies will probably
  41. be added to improve performance still further.
  42.  
  43.     3) It works with HAM and non-HAM images, either full screen or
  44. overscan.  It also works with European PAL Amigas.
  45.  
  46.  
  47.  
  48. DILBM
  49. -----
  50.  
  51. This program calculates the differences between two images and stores
  52. the result as a delta file.  The program is called with the names of
  53. three files:
  54.  
  55.         dilbm image1 image2 delta
  56.  
  57. The two image files must exist.  The delta file will be created.  The
  58. delta file represents the data required to convert image1 into image2.
  59. It is not reversible.
  60.  
  61. There is an alternate delta format that is reversible, to generate it,
  62. add an 'x' at the end of the command:
  63.  
  64.         dilbm image1 image2 delta x
  65.  
  66. Normally, dilbm will display a picture of the differences between the
  67. images.  To suppress this picture, add a 'q' at the end of the command,
  68. this will make dilbm run slightly faster.
  69.  
  70. In order for DILBM to work, both images must use the same palette and have
  71. the same size.  Images should either be full size or overscan (jumbo size).
  72. If the palettes (color maps) differ, or the sizes are not the same, DILBM
  73. will produce an informative error message, and then print out so much
  74. information that the error message will scroll off the screen, probably
  75. before you had a chance to read the message.
  76.  
  77. Paint programs give you direct control over the palette.  Be careful
  78. that all your images use the same palette.
  79.  
  80.  
  81. SCULPT 3-D and Animation (New section on MODE COLOR LOCK and EXPOSURE LOCK)
  82. ---------------------------------------------------------------------------
  83.  
  84. SCULPT 3-D uses a complicated algorithm to assign values to the color
  85. registers, so two images are unlikely to use the same palette.  To force
  86. SCULPT to use the same palette for several images, later versions have
  87. some undocumented and hidden features.  (If you have an older version,
  88. and you have sent in your registration card, you will be receiving an
  89. upgrade).
  90.  
  91. To activate the hidden commands, click on the down window and type
  92. control-D.  At the prompt, enter the magic number, which is 123.
  93. Examine the observer menu and you should see the commands: Mode Color
  94. Lock, Mode Color Unlock, Exposure Lock and Exposure Unlock.
  95.  
  96. Once Color Lock is set, new images will use the previous palette.  A
  97. palette may be established by making an image with mode color unlock, or
  98. by loading in an image (with or without color lock).  Because the color
  99. assignment is performed as the image is rendered, slightly different
  100. results will be obtained if you re-render the same image after locking
  101. the colors.
  102.  
  103. SCULPT 3-D also has an automatic exposure facility.  If this is allowed
  104. to operate and change the exposure from frame to frame in an animation,
  105. then you will not achieve optimum compression.  The Exposure Lock
  106. feature disables automatic exposure determination.  The manual override
  107. will still work, but probably should only be used with the same value
  108. for each frame.  The actual exposure value is calculated when an image
  109. is made, and is saved as a part of the scene, not as part of an image.
  110.  
  111. Here is how to generate images for use in an animation:
  112.  
  113.         1) Render the first image.  Save the image and also save the
  114.            scene after the image has been made (so that the exposure
  115.            value is saved).
  116.  
  117.         2) Turn on both color lock and exposure lock.
  118.            Recalculate the first image. Produce the
  119.            remaining images.
  120.  
  121.         3) If the sequence is interrupted, for example by a reboot, load
  122.            the first image (to get the palette).  Then load the first
  123.            scene (to get the exposure value).  Now lock the colors and
  124.            exposure.  Start rendering.
  125.  
  126. NOTE that if the exposure is locked, loading a scene will not affect
  127. the exposure lock, the exposure value, the color lock or the color
  128. values.  Reading in an image will always change the palette.
  129.  
  130. The new features have script equivalents:
  131.  
  132.                         MODE COLor LOCk
  133.                         MODE COLor UNLock
  134.                         EXPosure LOCk
  135.                         EXPosure UNLock
  136.  
  137. Here is a sample script file:
  138.  
  139. load scene "abc0.scene"
  140. start
  141. mode color lock
  142. exposure lock
  143. start
  144. save image "abc0.image"
  145. save scene "abc0.scene"
  146. exposure lock
  147. erase all
  148. load scene "abc1.scene"
  149. start
  150. save image "abc1.image"
  151. erase all
  152. load scene "abc2.scene"
  153. start
  154. save image "abc2.image"
  155. erase all
  156. load scene "abc3.scene"
  157. start
  158. save image "abc3.image"
  159. erase all
  160.  
  161. To continue the sequence, use
  162.  
  163. load scene "abc0.scene"
  164. load image "abc0.image"
  165. mode color lock
  166. exposure lock
  167. erase all
  168. load scene "abc4.scene"
  169. start
  170. save image "abc4.image"
  171. erase all
  172. load scene "abc5.scene"
  173. start
  174. save image "abc5.image"
  175. erase all
  176.  
  177. etc.
  178.  
  179.  
  180. SSG and Animation
  181. -----------------
  182.  
  183. Just as with SCULPT, you must force SSG to use the same color palette for
  184. each frame.  This can be done with the command line argument 'r=filename',
  185. where 'filename is the name of an image that serves to define the palette.
  186. It need not be a full size image.  For example
  187.  
  188. SSG i=robot1.dat o=palette s=1
  189. SSG i=robot1.dat o=robot1 r=palette
  190. SSG i=robot2.dat o=robot2 r=palette
  191.  
  192. The file 'palette' is a half size image (s=1) that is used to define the
  193. colors for the images 'robot1' and 'robot2'.
  194.  
  195. Remember to use TOILBM to convert SSG images into IFF format for use by
  196. DILBM.
  197.  
  198.  
  199. PILBM
  200. -----
  201.  
  202. This program packs delta files together to create an animation.  It
  203. takes a single argument that is the name of a text file that contains a
  204. description of the animation.  The following format must be followed:
  205.  
  206.         line
  207.           1     a     The name of the animation that is to be produced.
  208.           2     i     The name of the initial image.
  209.           3     d0    The name of the initial delta file.
  210.           4     d1    The name of the first delta file.
  211.           5     d2    The name of the second delta file.
  212.           ...
  213.           n+3   dn    The name of the last delta file.
  214.           n+4   *     An asterisk to denote the start of sequence control
  215.           n+5   m t   m is a delta number and t is a time delay
  216.           n+6   m t
  217.           ...
  218.                 m t
  219.  
  220. The animation works by double buffering, so you must specify two images.
  221. The file 'i' specifies the first image.  The delta file 'd0' defines the
  222. second image in terms of the first.
  223.  
  224. The delta file 'd0' is discarded after the second image file is
  225. constructed.  The remaining delta files, d1 to dn are stored in memory.
  226. When the animation is replayed, the following actions take place:
  227.  
  228. The first image is displayed on the screen.  Then the second image is
  229. displayed.  While the second image is displayed, the first image is
  230. changed with a delta file.  Then it is displayed while the second image
  231. is modified with another delta file.  This process is repeated.
  232.  
  233. The sequence control determines the order in which the delta files are
  234. used.  The value 'm' determines which delta file is to be used.  The
  235. value t specifies how much time (in jiffies) is to be used for the
  236. change.  If t is negative, then m is used to indicate a transfer to the
  237. m'th m-t pair.  Thus the following sequence
  238.  
  239.                 *
  240.                 3  2
  241.                 5  2
  242.                 9  2
  243.                 12 2
  244.                 2  -1
  245.  
  246. would stand for the following sequence of delta files:
  247.  
  248.         d3 d5 d9 d12 d5 d9 d12 d5 d9 d12 d5 d9 d12 etc.
  249.  
  250. Not all delta files need to be used (although that would be wasteful)
  251. and some may be used many times, if the sequence control specifies a
  252. loop.
  253.  
  254. Deciding which images to use to construct delta files, and the correct
  255. sequence of delta files is complicated because of the nature of double
  256. buffering.  Here is an example, suppose that we wish to display images
  257. in the following sequence:
  258.  
  259.         15 14 13 12 11 10 9 8 7 8 9 10 11 12 13 14 15 14 13 12 11 etc
  260.  
  261. then we can use the 'x' type of reversible deltas and compute the
  262. following files (it is a good idea to place the dilbm commands in a text
  263. file and use an 'execute' command).
  264.  
  265. dilbm  pic15.image pic14.image dx15-14 x q
  266. dilbm  pic15.image pic13.image dx15-13 x q
  267. dilbm  pic14.image pic12.image dx14-12 x q
  268. dilbm  pic13.image pic11.image dx13-11 x q
  269. dilbm  pic12.image pic10.image dx12-10 x q
  270. dilbm  pic11.image pic9.image  dx11-9  x q
  271. dilbm  pic10.image pic8.image  dx10-8  x q
  272. dilbm  pic9.image pic7.image   dx9-7   x q
  273. dilbm  pic8.image pic8.image   dx8-8   x q
  274. pilbm  buildx.script
  275.  
  276. The file buildx.script contains the following:
  277.  
  278.  
  279. picx.anim
  280. phongm15.image
  281. dx15-14
  282.  
  283. dx15-13
  284. dx14-12
  285. dx13-11
  286. dx12-10
  287. dx11-9
  288. dx10-8
  289. dx9-7
  290. dx8-8
  291. *
  292. 1 2
  293. 2 2
  294. 3 2
  295. 4 2
  296. 5 2
  297. 6 2
  298. 7 2
  299. 8 2
  300. 7 2
  301. 6 2
  302. 5 2
  303. 4 2
  304. 3 2
  305. 2 2
  306. 1 2
  307. 8 2
  308. 1 -1
  309.  
  310.  
  311. Note that the delta file dx8-8 causes no action to take place, so it is
  312. also used in place of dx14-14.
  313.  
  314.  
  315. MOVIE
  316. -----
  317.  
  318. The movie playback program is particularly simple.  Give it the name of
  319. an animation file.  Press the 'escape' key to stop an animation that is
  320. looping.
  321.  
  322. The program may also be run from workbench, set the default tool of the
  323. project (the animation file) to be 'movie'.  Alternatively, hold down
  324. the shift key and click on the project and then while still holding
  325. down the shift key, double click on the movie icon.
  326.